<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学情分析 - 学知题库</title>
    <link href="../assets/css/app.css" rel="stylesheet">
    <link href="../assets/css/font-awesome.min.css" rel="stylesheet">
    <script src="../assets/js/chart.umd.min.js"></script>
    
    <!-- Tailwind 配置 - 已合并到公共配置文件 -->
    <!-- 
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    -->
    
    <!-- 工具类样式 - 已合并到 src/input.css -->
    <!-- 
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .card-hover {
                transition: all 0.3s ease;
            }
            .card-hover:hover {
                transform: translateY(-5px);
                box-shadow: 0 10px 20px rgba(0,0,0,0.08);
            }
            .bg-gradient-primary {
                background: linear-gradient(135deg, #165DFF 0%, #0E42B3 100%);
            }
            .progress-ring-circle {
                transition: stroke-dashoffset 0.35s;
                transform: rotate(-90deg);
                transform-origin: 50% 50%;
            }
            .animate-float {
                animation: float 3s ease-in-out infinite;
            }
            @keyframes float {
                0% { transform: translateY(0px); }
                50% { transform: translateY(-10px); }
                100% { transform: translateY(0px); }
            }
        }
    </style>
    -->
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <a href="#" class="flex items-center">
                    <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                    <h1 class="text-xl font-bold text-gray-800">学知题库</h1>
                </a>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">学习路径</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">模拟考试</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">关于我们</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <img src="https://picsum.photos/40/40?random=user" alt="用户头像" class="w-10 h-10 rounded-full border-2 border-primary">
                    </div>
                    <span class="hidden md:inline text-gray-700">张同学</span>
                </div>
            </div>
        </div>
    </header>

    <!-- 主内容区（学情分析页面） -->
    <main class="flex-1 py-8 bg-gray-50">
        <div class="container mx-auto px-4">
            <!-- 页面标题与时间筛选 -->
            <div class="mb-8 flex flex-col md:flex-row md:items-center justify-between gap-4">
                <div>
                    <h2 class="text-2xl font-bold text-gray-800">学情分析</h2>
                    <p class="text-gray-500 mt-1">全面分析学习状态、学科表现与知识点掌握情况</p>
                </div>
                <div class="flex gap-2">
                    <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">本周</button>
                    <button class="px-4 py-2 bg-white text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">本月</button>
                    <button class="px-4 py-2 bg-white text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">本学期</button>
                </div>
            </div>

            <!-- 学习概览 -->
            <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">学习时长</h3>
                        <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center">
                            <i class="fa fa-clock-o text-primary"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">36.5h</span>
                        <span class="text-success flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-up mr-1"></i>29%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">较上周提升</p>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">做题总量</h3>
                        <div class="w-10 h-10 rounded-full bg-secondary/10 flex items-center justify-center">
                            <i class="fa fa-pencil text-secondary"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">1,286</span>
                        <span class="text-success flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-up mr-1"></i>12.7%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">较上周提升</p>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">平均正确率</h3>
                        <div class="w-10 h-10 rounded-full bg-success/10 flex items-center justify-center">
                            <i class="fa fa-check text-success"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">78%</span>
                        <span class="text-success flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-up mr-1"></i>4.3%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">较上周提升</p>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">掌握知识点</h3>
                        <div class="w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center">
                            <i class="fa fa-lightbulb-o text-accent"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">46/80</span>
                        <span class="text-success flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-up mr-1"></i>17.4%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">掌握率57.5%</p>
                </div>
            </div>

            <!-- 学科表现分析 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
                <!-- 学科雷达图 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-1">
                    <h3 class="text-lg font-bold text-gray-800 mb-6">学科综合表现</h3>
                    <div class="h-64 flex items-center justify-center">
                        <canvas id="subjectRadarChart"></canvas>
                    </div>
                    <div class="mt-6 space-y-3">
                        <div class="flex justify-between items-center">
                            <div class="flex items-center gap-2">
                                <span class="w-3 h-3 rounded-full bg-primary"></span>
                                <span class="text-sm text-gray-600">数学</span>
                            </div>
                            <span class="text-sm font-medium">82分</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="flex items-center gap-2">
                                <span class="w-3 h-3 rounded-full bg-secondary"></span>
                                <span class="text-sm text-gray-600">语文</span>
                            </div>
                            <span class="text-sm font-medium">88分</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="flex items-center gap-2">
                                <span class="w-3 h-3 rounded-full bg-accent"></span>
                                <span class="text-sm text-gray-600">英语</span>
                            </div>
                            <span class="text-sm font-medium">75分</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="flex items-center gap-2">
                                <span class="w-3 h-3 rounded-full bg-warning"></span>
                                <span class="text-sm text-gray-600">物理</span>
                            </div>
                            <span class="text-sm font-medium">65分</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="flex items-center gap-2">
                                <span class="w-3 h-3 rounded-full bg-danger"></span>
                                <span class="text-sm text-gray-600">化学</span>
                            </div>
                            <span class="text-sm font-medium">70分</span>
                        </div>
                    </div>
                </div>

                <!-- 学科排名与趋势 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-2">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-bold text-gray-800">学科排名与趋势</h3>
                        <div class="flex gap-2">
                            <button class="px-3 py-1 bg-primary/10 text-primary text-sm rounded-full">正确率</button>
                            <button class="px-3 py-1 bg-gray-100 text-gray-600 text-sm rounded-full hover:bg-gray-200 transition-colors">做题量</button>
                        </div>
                    </div>
                    <div class="h-64">
                        <canvas id="subjectTrendChart"></canvas>
                    </div>
                </div>
            </div>

            <!-- 知识点掌握与学习建议 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
                <!-- 知识点掌握情况 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-1">
                    <h3 class="text-lg font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fa fa-list-ul text-primary mr-2"></i>知识点掌握
                    </h3>
                    <div class="space-y-4">
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">数学 - 函数应用</span>
                                <span class="text-sm font-medium">90%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-primary h-2 rounded-full" style="width: 90%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">语文 - 现代文阅读</span>
                                <span class="text-sm font-medium">85%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-secondary h-2 rounded-full" style="width: 85%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">英语 - 语法应用</span>
                                <span class="text-sm font-medium">72%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-accent h-2 rounded-full" style="width: 72%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">物理 - 圆周运动</span>
                                <span class="text-sm font-medium">45%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-warning h-2 rounded-full" style="width: 45%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">化学 - 化学反应速率</span>
                                <span class="text-sm font-medium">68%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-danger h-2 rounded-full" style="width: 68%"></div>
                            </div>
                        </div>
                    </div>
                    <a href="#" class="mt-6 inline-block w-full py-2 text-center border border-primary text-primary rounded-lg hover:bg-primary/5 transition-colors">
                        查看全部知识点
                    </a>
                </div>

                <!-- 学习建议与推荐 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-2">
                    <h3 class="text-lg font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fa fa-lightbulb-o text-accent mr-2"></i>学习建议与推荐
                    </h3>
                    <div class="space-y-6">
                        <div class="bg-primary/5 rounded-xl p-5 border border-primary/20">
                            <h4 class="font-medium text-gray-800 mb-3">综合学习建议</h4>
                            <p class="text-gray-700 text-sm">
                                本周整体学习状态良好，语文和数学表现突出，但物理学科的圆周运动知识点掌握较弱。建议优先补强物理薄弱环节，可通过专题练习和视频讲解巩固。英语语法需加强应用训练，建议每天安排15分钟针对性练习。
                            </p>
                        </div>
                        
                        <h4 class="font-medium text-gray-800">推荐学习内容</h4>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                            <div class="p-4 bg-neutral rounded-lg card-hover">
                                <div class="flex items-center gap-2 mb-3">
                                    <span class="px-2 py-1 bg-warning/10 text-warning text-xs rounded-full">物理</span>
                                    <span class="text-sm text-gray-500">薄弱知识点补强</span>
                                </div>
                                <h5 class="font-medium text-gray-800 text-sm mb-2">圆周运动专题突破课</h5>
                                <p class="text-gray-600 text-xs mb-3">3个视频讲解 + 20道精选习题</p>
                                <a href="#" class="text-primary text-xs flex items-center hover:underline">
                                    立即学习 <i class="fa fa-angle-right ml-1"></i>
                                </a>
                            </div>
                            <div class="p-4 bg-neutral rounded-lg card-hover">
                                <div class="flex items-center gap-2 mb-3">
                                    <span class="px-2 py-1 bg-accent/10 text-accent text-xs rounded-full">英语</span>
                                    <span class="text-sm text-gray-500">语法强化</span>
                                </div>
                                <h5 class="font-medium text-gray-800 text-sm mb-2">语法应用专项训练</h5>
                                <p class="text-gray-600 text-xs mb-3">30道题 + 详细解析 + 技巧总结</p>
                                <a href="#" class="text-primary text-xs flex items-center hover:underline">
                                    立即学习 <i class="fa fa-angle-right ml-1"></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 学习趋势与时间分布 -->
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                <!-- 学习趋势 -->
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-bold text-gray-800">学习趋势</h3>
                        <div class="flex gap-2">
                            <button class="px-3 py-1 bg-primary text-white text-sm rounded-full">正确率</button>
                            <button class="px-3 py-1 bg-gray-100 text-gray-600 text-sm rounded-full hover:bg-gray-200 transition-colors">做题量</button>
                            <button class="px-3 py-1 bg-gray-100 text-gray-600 text-sm rounded-full hover:bg-gray-200 transition-colors">时长</button>
                        </div>
                    </div>
                    <div class="h-64">
                        <canvas id="learningTrendChart"></canvas>
                    </div>
                </div>

                <!-- 学习时间分布 -->
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <h3 class="text-lg font-bold text-gray-800 mb-6">学习时间分布</h3>
                    <div class="h-64">
                        <canvas id="timeDistributionChart"></canvas>
                    </div>
                    <div class="mt-4 text-sm text-gray-500 text-center">
                        <p>您的学习主要集中在晚间19:00-21:00，建议适当分散到下午时段</p>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-12 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <div class="flex items-center mb-4">
                        <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                        <h3 class="text-xl font-bold">学知题库</h3>
                    </div>
                    <p class="text-gray-400 mb-4">智能教育资源平台，助力学生高效学习</p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-weibo"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-wechat"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-qq"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-github"></i>
                        </a>
                    </div>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">快速链接</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">题库</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">学习路径</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">模拟考试</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">关于我们</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">帮助中心</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">使用指南</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">意见反馈</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">隐私政策</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">联系我们</h4>
                    <ul class="space-y-2">
                        <li class="flex items-center">
                            <i class="fa fa-map-marker text-primary mr-2"></i>
                            <span class="text-gray-400">北京市海淀区中关村大街1号</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-phone text-primary mr-2"></i>
                            <span class="text-gray-400">400-123-4567</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-envelope text-primary mr-2"></i>
                            <span class="text-gray-400">contact@xuezhi.com</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-clock-o text-primary mr-2"></i>
                            <span class="text-gray-400">周一至周日 9:00-21:00</span>
                        </li>
                    </ul>
                </div>
            </div>
            
            <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
                <p>&copy; 2025 学知题库 版权所有 | 京ICP备12345678号</p>
            </div>
        </div>
    </footer>

    <!-- JavaScript -->
    <script>
        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('py-2');
                header.classList.remove('py-3');
                header.classList.add('shadow');
            } else {
                header.classList.add('py-3');
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });

        // 图表初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 学科雷达图
            const radarCtx = document.getElementById('subjectRadarChart').getContext('2d');
            new Chart(radarCtx, {
                type: 'radar',
                data: {
                    labels: ['数学', '语文', '英语', '物理', '化学'],
                    datasets: [{
                        label: '当前得分',
                        data: [82, 88, 75, 65, 70],
                        backgroundColor: 'rgba(22, 93, 255, 0.2)',
                        borderColor: '#165DFF',
                        pointBackgroundColor: '#fff',
                        pointBorderColor: '#165DFF',
                        pointBorderWidth: 2,
                        pointRadius: 4
                    }, {
                        label: '班级平均',
                        data: [75, 80, 70, 60, 65],
                        backgroundColor: 'rgba(150, 150, 150, 0.1)',
                        borderColor: '#999',
                        borderDash: [5, 5],
                        pointBackgroundColor: '#fff',
                        pointBorderColor: '#999',
                        pointBorderWidth: 2,
                        pointRadius: 3
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        r: {
                            min: 0,
                            max: 100,
                            ticks: {
                                display: false
                            }
                        }
                    },
                    plugins: {
                        legend: {
                            display: false
                        }
                    }
                }
            });

            // 学科趋势图
            const subjectTrendCtx = document.getElementById('subjectTrendChart').getContext('2d');
            new Chart(subjectTrendCtx, {
                type: 'bar',
                data: {
                    labels: ['数学', '语文', '英语', '物理', '化学'],
                    datasets: [{
                        label: '本周正确率',
                        data: [82, 88, 75, 65, 70],
                        backgroundColor: [
                            '#165DFF',
                            '#36CBCB',
                            '#FF7D00',
                            '#FF7D00',
                            '#F53F3F'
                        ],
                        borderRadius: 6
                    }, {
                        label: '上周正确率',
                        data: [78, 85, 72, 60, 68],
                        backgroundColor: 'rgba(22, 93, 255, 0.2)',
                        borderRadius: 6
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            position: 'top',
                            align: 'end'
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: false,
                            min: 50,
                            max: 100,
                            ticks: {
                                callback: function(value) {
                                    return value + '%';
                                }
                            },
                            grid: {
                                drawBorder: false
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    }
                }
            });

            // 学习趋势图
            const trendCtx = document.getElementById('learningTrendChart').getContext('2d');
            new Chart(trendCtx, {
                type: 'line',
                data: {
                    labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
                    datasets: [{
                        label: '正确率',
                        data: [72, 68, 75, 70, 80, 82, 78],
                        borderColor: '#165DFF',
                        backgroundColor: 'rgba(22, 93, 255, 0.1)',
                        tension: 0.4,
                        fill: true,
                        pointBackgroundColor: '#fff',
                        pointBorderColor: '#165DFF',
                        pointBorderWidth: 2,
                        pointRadius: 4
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            display: false
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: false,
                            min: 50,
                            max: 100,
                            ticks: {
                                callback: function(value) {
                                    return value + '%';
                                }
                            },
                            grid: {
                                drawBorder: false
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    }
                }
            });

            // 时间分布图
            const timeDistCtx = document.getElementById('timeDistributionChart').getContext('2d');
            new Chart(timeDistCtx, {
                type: 'line',
                data: {
                    labels: ['6:00', '8:00', '10:00', '12:00', '14:00', '16:00', '18:00', '20:00', '22:00'],
                    datasets: [{
                        label: '学习时长(小时)',
                        data: [0.5, 1.2, 0.8, 0.3, 0.5, 1.0, 1.5, 2.8, 0.7],
                        borderColor: '#FF7D00',
                        backgroundColor: 'rgba(255, 125, 0, 0.1)',
                        tension: 0.4,
                        fill: true
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            display: false
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: true,
                            grid: {
                                drawBorder: false
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    }
                }
            });
        });

        // 返回顶部按钮
        const backToTopButton = document.createElement('button');
        backToTopButton.id = 'backToTop';
        backToTopButton.className = 'fixed bottom-6 right-6 bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center shadow-lg opacity-0 transition-opacity duration-300 hover:bg-primary/90';
        backToTopButton.innerHTML = '<i class="fa fa-arrow-up"></i>';
        document.body.appendChild(backToTopButton);
        
        window.addEventListener('scroll', function() {
            if (window.scrollY > 300) {
                backToTopButton.classList.add('opacity-100');
                backToTopButton.classList.remove('opacity-0');
            } else {
                backToTopButton.classList.add('opacity-0');
                backToTopButton.classList.remove('opacity-100');
            }
        });
        
        backToTopButton.addEventListener('click', function() {
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });
    </script>
</body>
</html>